package ctl.game.charactor;

public class Hero {

    private String name;

    private float hp;

    private int damage;

    private int id;
/**
 * get、set方法
 * @return
 */
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public float getHp() {
        return hp;
    }

    public void setHp(float hp) {
        this.hp = hp;
    }

    public int getDamage() {
        return damage;
    }

    public void setDamage(int damage) {
        this.damage = damage;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public static String getCopyright() {
        return copyright;
    }

    public static void setCopyright(String copyright) {
        Hero.copyright = copyright;
    }

    static String copyright;
/**
 * 静态方法和构造方法
 */
    static {
        System.out.println("初始化");
        copyright = "版权有Riot Game公司所有";
    }
    
    public boolean isDead(){
        return false;
    }
    
    public void attactHero(Hero h2){
        System.out.println(this.name+"正在攻击"+h2.getName()+"......");
    }
    /**
     * 重写toString()
     */
    public String toString(){
        return "Hero[name="+name+"]";
    }
}
